<?php
namespace Home\Controller;
use Think\Controller;
class PayController extends ShareController {
	public function _initialize(){
		parent::_initialize();
		parent::header();
	}
	
	//支付页面显示内容
    public function pay(){
		$order_id	= I('get.order_id');
		$uid		= $_SESSION['uid'];
		$Address	= M('Address');
		$Shopcar	= M('Ware_shopcar');
		
		$list = $Shopcar->where("order_id={$order_id}")->select();
		$list1	= $Address->where("user_id={$uid}")->select();
		$moren	= $Address->where("click=1")->find();
		
		$this->assign('list',$list);
		$this->assign('list1',$list1);
		$this->assign('moren',$moren);
        $this->display();
    }
    
    public function success(){
		$order_id = I('get.order_id');
		
		$Pay = M('Ware_pay');
		$Address = M('Address');
		
		$list =  $Pay->where("order_id={$order_id}")->find();
		$list1	= $Address->where("click=1")->find();
		
		$this->assign('list',$list);
		$this->assign('list1',$list1);
		$this->assign('order_id',$order_id);
		$this->display();
	}
}
